<!--

Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Title      : Cup of Coffee
Version    : 1.0
Released   : 20081207
Description: A two-column, fixed-width and lightweight template ideal for 1024x768 resolutions. Suitable for blogs and small websites.

-->
<%@include file="/WEB-INF/pages/commons/commons.jsp" %>

<stripes:layout-definition>
<!DOCTYPE html PUBLIC
    "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <title><c:out value="${_title}"/></title>
    <meta name="keywords" content="" />
    <meta name="description" content="" />
    <link href='<c:url value="${_blogThemePath}/styles/default.css"/>' rel="stylesheet" type="text/css" />
    <link href='<c:url value="${_blogThemePath}/styles/radeox.css"/>' rel="stylesheet" type="text/css" />

    <script type="text/javascript" src="<c:url value="${_blogThemePath}/scripts/jquery.js"/>"></script>

    <stripes:layout-component name="_head"/>
</head>
<body>

<div id="wrapper">

<!-- start header -->
<div id="header">
	<div id="menu">
        <stripes:useActionBean var="allTags" beanclass="foo.bar.blog.web.action.general.BlogActionBean"
                               event="allTags" executeResolution="false" validate="false"
                               alwaysExecuteEvent="true"  />

        <ul>
            <li <c:if test="${actionBean.selectedTag == null}">class="current_page_item"</c:if>>
                <stripes:link beanclass="foo.bar.blog.web.action.general.BlogActionBean" event="view">
                    <stripes:param name="blog" value="${actionBean.blog.id}"/>
                    <stripes:param name="selectedTag" value="null"/>
                    <stripes:param name="calendar" value="null"/>
                    <stripes:param name="search" value="null"/>
                    All
                </stripes:link>
            </li>
            <c:forEach var="currentTag" items="${allTags.allTags}" varStatus="status">
            <li <c:if test="${actionBean.selectedTag eq currentTag}">class="current_page_item"</c:if>>
                <stripes:link beanclass="foo.bar.blog.web.action.general.BlogActionBean" event="view">
                    <stripes:param name="blog" value="${actionBean.blog.id}"/>
                    <stripes:param name="selectedTag" value="${currentTag.id}"/>
                    <c:out value="${currentTag.name}"/>
                </stripes:link>
            </li>
            </c:forEach>
            <li class="last"></li>
        </ul>
	</div>
</div>
<!-- end header -->

<div id="logo">
	<h1><a href="#">${_blogName}</a></h1>
	<h2>${_blogDescription}</h2>
</div>

<!-- start page -->
<div id="page">
	<!-- start content -->
	<div id="content">
        <jsecurity:lacksPermission name="blog:viewBlogMainPage:${actionBean.blog.id}">
            No "blog:viewBlogMainPage:${actionBean.blog.id}" permission
        </jsecurity:lacksPermission>
        <jsecurity:hasPermission name="blog:viewBlogMainPage:${actionBean.blog.id}">
            <stripes:layout-component name="_content"/>
        </jsecurity:hasPermission>
    </div>
	<!-- end content -->
	<!-- start sidebar -->
	<div id="sidebar">
		<ul>
            <jsecurity:guest>
                <li>
                    <stripes:link beanclass="foo.bar.blog.web.action.general.LoginActionBean" event="view">login</stripes:link>|
                    <stripes:link beanclass="foo.bar.blog.web.action.general.RegisterActionBean" event="view">register</stripes:link>
                </li>
            </jsecurity:guest>
            <jsecurity:authenticated>
                <li>
                    <stripes:link beanclass="foo.bar.blog.web.action.general.LogoutActionBean" event="view">logout</stripes:link>|
                    <stripes:link beanclass="foo.bar.blog.web.action.registered.ProfileActionBean" event="view">profile</stripes:link>
                </li>
            </jsecurity:authenticated>

            <li id="search">
				<h2>Search</h2>
				<stripes:form beanclass="foo.bar.blog.web.action.general.BlogActionBean" method="GET">
					<fieldset>
                        <input type="hidden" name="blog" value="${actionBean.blog.id}"/>
                        <input type="text" id="s" name="search" value="" />
					    <input type="submit" id="x" name="view" value="Search" />
					</fieldset>
				</stripes:form>
			</li>
			<li>
                <h2>Calendar</h2>
                <ul>
                    <li>
                        <div id="calendarDiv">
                            <stripes:url var="calendar_url" beanclass="foo.bar.blog.web.action.general.CalendarActionBean" event="view" prependContext="false">
                                <stripes:param name="blog" value="${actionBean.blog.id}"/>
                            </stripes:url>
                            <c:import url="${calendar_url}"/>
                        </div>
                    </li>
                </ul>
                <br/><br/>
                <h2>Links</h2>
                <ul>
                <stripes:useActionBean var="allLinks" beanclass="foo.bar.blog.web.action.general.BlogActionBean"
                               event="allLinks" executeResolution="false" validate="false"
                               alwaysExecuteEvent="true"/>
                <c:forEach var="currentLink" items="${allLinks.allLinks}" varStatus="status">
                    <li>
                        <stripes:link href="${currentLink.link}">
                            <c:out value="${currentLink.name}"/>
                        </stripes:link>
                    </li>
                </c:forEach>
                </ul>
			</li>
		</ul>
	</div>
	<!-- end sidebar -->
	<div style="clear: both;">&nbsp;</div>
</div>
<!-- end page -->
<!-- start footer -->
<div id="footer">
    <div id="footer-wrap">
            <stripes:link beanclass="foo.bar.blog.web.action.general.BlogFeedsActionBean" event="view">
                <stripes:param name="blog" value="${actionBean.blog.id}" />
                <stripes:param name="feedType" value="rss_2_0"/>
                RSS 2.0
            </stripes:link>
            <stripes:link beanclass="foo.bar.blog.web.action.general.BlogFeedsActionBean" event="view">
                <stripes:param name="blog" value="${actionBean.blog.id}"/>
                <stripes:param name="feedType" value="atom_1_0"/>
                ATOM 1.0
            </stripes:link>
            <br/>
            <p id="legal">(c) 2007 Blog. Design by <a href="http://www.freecsstemplates.org/">Free CSS Templates</a>.</p>
	</div>
</div>
<!-- end footer -->

</div>

</body>
</html>
</stripes:layout-definition>
